github runner updates (#919)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Fri, 2 Sep 2022 19:17:12 +0000 (13:17 -0600)
committerGitHub <noreply@github.com>
Fri, 2 Sep 2022 19:17:12 +0000 (13:17 -0600)
* update github action for macos, windows.

* fix macos action

* try harder to fix macos action

* try harder yet

* simplify mac cache keys, no compiler dependency

.github/workflows/macos.yml
.github/workflows/windows.yml
tools/travis_install_osx

index 6049c5bca80ed5b3084613b1a9e20d39708d2838..730b30e594b8049ba3c5de3542face08337656bc 100644 (file)
@@ -10,11 +10,22 @@ on:
     - cron: '27 4 * * 2'
 
 jobs:
-  macos_release:
-    name: macos release Build
+  macos:
+    name: macOS Build
     runs-on: macos-latest
-    env:
-      QT_VERSION: '5.12.12'
+    strategy:
+      fail-fast: false
+      matrix:
+        include:
+          - QT_VERSION: '5.12.12'
+            XCODE_VERSION: '11.7'
+            RELEASE: false
+          - QT_VERSION: '5.15.2'
+            XCODE_VERSION: '12.4'
+            RELEASE: false
+          - QT_VERSION: '6.2.4'
+            XCODE_VERSION: '12.5.1'
+            RELEASE: true
 
     steps:
     - name: Checkout repository
@@ -25,7 +36,7 @@ jobs:
       id: cache
       with:
         path: ~/Cache
-        key: ${{ runner.os }}-${{ env.QT_VERSION }}-${{ secrets.CACHE_VERSION }}
+        key: ${{ runner.os }}-${{ matrix.QT_VERSION }}-${{ secrets.CACHE_VERSION }}
 
     - name: Qt install setup
       if: steps.cache.outputs.cache-hit != 'true'
@@ -38,108 +49,28 @@ jobs:
       env:
         TRAVIS_BUILD_DIR: ${{ github.workspace }}
       run: |
-        ./tools/travis_install_osx ${QT_VERSION} aqt
+        ./tools/travis_install_osx ${{ matrix.QT_VERSION }} aqt
 
     - name: Script
       run: |
-        source ${HOME}/Cache/qt-${QT_VERSION}.env
-        sudo xcode-select --switch /Applications/Xcode_11.7.app
+        source ${HOME}/Cache/qt-${{ matrix.QT_VERSION }}.env
+        sudo xcode-select --switch /Applications/Xcode_${{ matrix.XCODE_VERSION }}.app
         ./tools/travis_script_osx
-        echo GITHUB_REF: $GITHUB_REF
 
     - name: Deploy
       # This only handles continous releases now, for other events artifacts may be saved in
       # the 'Upload Artifacts' step.
-      if: ( github.event_name == 'push' ) && ( github.ref == 'refs/heads/master' )
+      if: ( github.event_name == 'push' ) && ( github.ref == 'refs/heads/master' ) && matrix.RELEASE
       env:
         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         RELEASE_NAME: Continuous-${{ runner.os }}
       run: |
+        echo GITHUB_REF: $GITHUB_REF
         ./tools/uploadtool/upload_github.sh gui/GPSBabel-*.dmg
 
     - name: 'Upload Artifacts'
       uses: actions/upload-artifact@v2
       with:
-        name: MacOS_Installer
-        path: gui/GPSBabel-*.dmg
-        retention-days: 7
-
-  macos_edge:
-    name: macos edge Build
-    runs-on: macos-latest
-    env:
-      QT_VERSION: '5.15.2'
-
-    steps:
-    - name: Checkout repository
-      uses: actions/checkout@v2
-
-    - name: Cache Qt
-      uses: actions/cache@v2
-      with:
-        path: ~/Cache
-        key: ${{ runner.os }}-${{ env.QT_VERSION }}-${{ secrets.CACHE_VERSION }}
-
-    - name: Qt install
-      env:
-        ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
-        ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }}
-        ARTIFACTORY_BASE_URL: ${{ secrets.ARTIFACTORY_BASE_URL }}
-      run: |
-        ./tools/travis_install_osx ${QT_VERSION} artifactory
-
-    - name: Script
-      run: |
-        source ${HOME}/Cache/qt-${QT_VERSION}.env
-        sudo xcode-select --switch /Applications/Xcode_12.4.app
-        ./tools/travis_script_osx
-
-    - name: 'Upload Artifacts'
-      uses: actions/upload-artifact@v2
-      with:
-        name: MacOS_Installer_Edge
-        path: gui/GPSBabel-*.dmg
-        retention-days: 7
-
-  macos_qt6:
-    name: macos Qt6 Build
-    runs-on: macos-latest
-    env:
-      QT_VERSION: '6.2.4'
-
-    steps:
-    - name: Checkout repository
-      uses: actions/checkout@v2
-
-    - name: Cache Qt
-      uses: actions/cache@v2
-      id: cache
-      with:
-        path: ~/Cache
-        key: ${{ runner.os }}-${{ env.QT_VERSION }}-${{ secrets.CACHE_VERSION }}
-
-    - name: Qt install setup
-      if: steps.cache.outputs.cache-hit != 'true'
-      uses: actions/setup-python@v2
-      with:
-        python-version: '3.9'
-
-    - name: Qt install
-      if: steps.cache.outputs.cache-hit != 'true'
-      env:
-        TRAVIS_BUILD_DIR: ${{ github.workspace }}
-      run: |
-        ./tools/travis_install_osx ${QT_VERSION} aqt
-
-    - name: Script
-      run: |
-        source ${HOME}/Cache/qt-${QT_VERSION}.env
-        sudo xcode-select --switch /Applications/Xcode_12.5.1.app
-        ./tools/travis_script_osx
-
-    - name: 'Upload Artifacts'
-      uses: actions/upload-artifact@v2
-      with:
-        name: MacOS_Installer_Qt6
+        name: MacOS_Installer ${{ join(matrix.*) }}
         path: gui/GPSBabel-*.dmg
         retention-days: 7
index 7c4d3e5c430a2561fd81d4651017a8ec82e7de6d..812dc425d968521cc93a93ba4b57b03e0b8f3a9d 100644 (file)
@@ -24,7 +24,7 @@ jobs:
             COMPILER: 'msvc2017_64'
             METHOD: 'aqt'
             FLOW: 'nmake'
-            RELEASE: true
+            RELEASE: false
           - QT_VERSION: '5.12.12'
             ARCH: 'amd64'
             HOST_ARCH: 'x86'
@@ -59,7 +59,7 @@ jobs:
             HOST_ARCH: 'amd64'
             COMPILER: 'msvc2019_64'
             METHOD: 'aqt'
-            RELEASE: false
+            RELEASE: true
             FLOW: 'nmake'
 
     steps:
index 847d5e74768d8eff1e09dd5f216ed2bc0acd6f5c..643e4c92940ad70dae7fa53fd821fe408713a3ea 100755 (executable)
@@ -30,8 +30,8 @@ function validate() {
   )
 }
 
-QT_VERSION=${1:-5.12.2}
-METHOD=${2:-artifactory}
+QT_VERSION=${1:-6.2.4}
+METHOD=${2:-aqt}
 
 # our expectation is that install-qt creates $QTDIR, $QTDIR/bin.
 CACHEDIR=${HOME}/Cache